package com.hspedu.polymorphic_.polyparameter;

public class Worker extends Employee{
    public Worker(String name, int salary) {
        super(name, salary);
    }
    public void work(){
        System.out.println("普通员工" + getName()+" is working");
    }

    @Override
    int getAnnual() {//普通员工没有其他收入，所以直接调用父类的工资方法
        return super.getAnnual();
    }
}
